import { Module } from '@nestjs/common';
import { UserService } from './user.service';
import { UserController } from './user.controller';
import { User } from './entities/user.entity';
import { VerificationHistory } from './entities/verificationHistory.entity';
import { TypeOrmModule } from '@nestjs/typeorm';
import JwtAuthStrategy from './auth/jwtStrategy';
import { JwtModule } from '@nestjs/jwt';
import { jwtConstants } from '../shared/constants';
import { CloudStorageService } from '../shared/cloudStorage.service';
import { SendEmailService } from '../shared/sendEmail.service';
import { RedisService } from '../shared/redis.service';

@Module({
  imports: [
    JwtModule.register({
      secret: jwtConstants.secret,
      signOptions: { expiresIn: jwtConstants.expiresIn },
    }),
    TypeOrmModule.forFeature([User, VerificationHistory]),
  ],
  controllers: [UserController],
  providers: [
    UserService,
    JwtAuthStrategy,
    CloudStorageService,
    SendEmailService,
    RedisService,
  ],
})
export class UserModule {}
